Call-By-Name CPS-Translation as a Binding-Time Improvement

نویسندگان

  • Kristian Nielsen
  • Morten Heine Sørensen
چکیده

Much attention has been given to the call-by-value continuation passing style (CBV CPS) translation as a tool in partial evaluation, but the call-by-name (CBN) CPS translation has not been investigated. We undertake a systematic investigation of the eeect of CBN CPS in connection with partial evaluation and deforestation. First, we give an example where CBN CPS translation acts as a binding time improvement to achieve the eeects of deforestation using partial evaluation. The same eeect cannot be achieved with CBV CPS. Second, we prove formally that the CBN CPS translation together with partial evaluation has the power to achieve all the eeects of deforestation. The consequence of these results is a practical tool (the CBN CPS) for improving the results of partial evaluation, as well as an improved understanding of the relation between partial evaluation and deforestation.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

A Call-by-Name CPS Hierarchy

The Continuation-Passing-Style (CPS) translation gives semantics to control operators such as exception and first-class continuations. By iterating this translation, Danvy and Filinski obtained a CPS hierarchy, and used it to specify a series of control operators, hierarchical (or layered) delimited-control operators, We introduce a call-by-name variant of the CPS hierarchy. While most of the w...

متن کامل

Call-by-Need and Continuation-Passing Style

This paper examines the transformation of call-by-need terms into continuation passing style (CPS). It begins by presenting a simple transformation of call-by-need terms into program graphs and a reducer for such graphs. From this, an informal derivation is carried out, resulting in a translation from terms into self-reducing program graphs, where the graphs are represented as CPS terms involvi...

متن کامل

Type - Preserving CPS Translation of Σ and Π Types is Not Not Possible 22 : 3

Dependently typed languages such as Coq are used to specify and prove functional correctness of source programs, but what we ultimately need are guarantees about correctness of compiled code. By preserving dependent types through each compiler pass, we could preserve source-level specifications and correctness proofs into the generated target-language programs. Unfortunately, type-preserving co...

متن کامل

Type - Preserving CPS Translation of Σ and Π Types is Not Not

Dependently typed languages like Coq are used to specify and prove functional correctness of source programs, but what we ultimately need are guarantees about correctness of compiled code. By preserving dependent types through each compiler pass, we could preserve source-level specifications and correctness proofs into the generated target-language programs. Unfortunately, type-preserving compi...

متن کامل

Linear-use CPS translations in the Enriched Effect Calculus

The enriched effect calculus (EEC) is an extension of Moggi’s computational metalanguage with a selection of primitives from linear logic. This paper explores the enriched effect calculus as a target language for continuation-passing-style (CPS) translations in which the typing of the translations enforces the linear usage of continuations. We first observe that established call-by-value and ca...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 1995